<template>
    <div>
        <button @click="handleClick">点击显示modal</button>
        <mod :visible="visible" @on-cancel="cancel" @on-confirm="confirm"></mod>
    </div>
</template>


<script>
    import mod from './mod'
    export default {
        data(){
            return {
                visible:false
            }
        },
        components:{
            mod
        },
        methods:{
           handleClick(){
                this.visible = true
           },
           confirm(){
            this.visible = false
            alert('姬霓太美')
           },
           cancel(){
            this.visible = false
            alert('下五洋捉九鸡')
           }
        }
    }
</script>